import React, {Component} from 'react';

export default (CMP) => class HOC extends Component {
  constructor (props) {
    super(props);
    this.state = {};
  }

  proc (CMPInstance) {
    CMPInstance.showProps();
    // console.log(CMPInstance);
  }
  render () {
    const props = Object.assign({}, this.props, {
      ref: this.proc.bind(this),
      text: 'new Props'
    });
    return (
      <CMP {...props}></CMP>
    )
  }
}
